package IO.g1.Decorator;

public class CoffeeMachine {

	public static void main(String[] args) {
		
		Coffee c = new BlackCoffee();
		System.out.println("Cost: " + c.getCost() + "; Ingredients: " + c.getIngredients());
		
		c = new Milk(c);
		System.out.println("Cost: " + c.getCost() + "; Ingredients: " + c.getIngredients());
		
		c = new Sugar(c);
		System.out.println("Cost: " + c.getCost() + "; Ingredients: " + c.getIngredients());
		
		Coffee all = new Sugar(new Milk(new BlackCoffee()));
		System.out.println("Cost: " + all.getCost() + "; Ingredients: " + all.getIngredients());
	}
}
